//package cn.zl.netty.client;
//
//import io.netty.buffer.ByteBuf;
//import io.netty.channel.ChannelHandlerContext;
//import io.netty.channel.ChannelInboundHandlerAdapter;
//import io.netty.util.CharsetUtil;
//
///**
// * @Description:客户端处理器
// * @Author: zhanglang
// * @Date: 2020/8/24 9:32
// */
//public class SimpleClientHandler extends ChannelInboundHandlerAdapter {
//    @Override
//    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//        System.out.println("SimpleClientHandler.channelRead");
//        ByteBuf buf = (ByteBuf) msg;
//        System.out.println("Client received: " + buf.toString(CharsetUtil.UTF_8));
//    }
//
//    @Override
//    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
//        cause.printStackTrace();
//        ctx.close();
//    }
//}
